//
//  LZVideoDetailBtnsCell.m
//  LzzizDemo
//
//  Created by xbnzd on 16/11/4.
//  Copyright © 2016年 xbnzd. All rights reserved.
//

#import "LZVideoDetailBtnsCell.h"

@interface LZVideoDetailBtnsCell()
@property (weak, nonatomic) IBOutlet UILabel *shareCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *msgCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *collectCountLabel;
@property (weak, nonatomic) IBOutlet UIImageView *collectIcon;
@property (weak, nonatomic) IBOutlet UILabel *zanCountLabel;
@property (weak, nonatomic) IBOutlet UIImageView *zanIcon;
@property (weak, nonatomic) IBOutlet UIButton *collectBtn;
@property (weak, nonatomic) IBOutlet UIButton *zanBtn;

@end

@implementation LZVideoDetailBtnsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.shareCountLabel.font = [UIFont fontWithName:@"ArialMT" size:15];
    self.msgCountLabel.font = [UIFont fontWithName:@"ArialMT" size:15];
    self.zanCountLabel.font = [UIFont fontWithName:@"ArialMT" size:15];
    self.collectCountLabel.font = [UIFont fontWithName:@"ArialMT" size:15];
    
    self.backgroundColor = [UIColor whiteColor];
}

#pragma mark -
#pragma mark 对外方法
- (void)loadZanNum:(NSInteger)zanNum CollectNum:(NSInteger)collectNum MsgNum:(NSInteger)msgNum ShareNum:(NSInteger)shareNum
{
    self.zanCountLabel.text = [NSString stringWithFormat:@"%ld",(long)zanNum];
    self.collectCountLabel.text = [NSString stringWithFormat:@"%ld",(long)collectNum];
    self.msgCountLabel.text = [NSString stringWithFormat:@"%ld",(long)msgNum];
    self.shareCountLabel.text = [NSString stringWithFormat:@"%ld",(long)shareNum];
    
}

- (void)setZanIconSelectedState
{
    self.zanIcon.image = [UIImage imageNamed:@"首页_点赞_已点赞"];
    self.zanBtn.enabled = NO;
}

- (void)setCollectIconStateIsSelected:(BOOL)selected
{
    if (selected) {
        self.collectIcon.image = [UIImage imageNamed:@"首页_关注_已收藏"];
    }else{
        self.collectIcon.image = [UIImage imageNamed:@"关注"];
    }
}

#pragma mark -
#pragma mark btn action

/**
 按钮方法 tag 0:分享  1信息  2收藏  3点赞

 */
- (IBAction)cellButtonAction:(UIButton *)sender {
    
    if (self.btnsCellDelegate && [self.btnsCellDelegate respondsToSelector:@selector(clickBtnsWithBtnTag:)]) {
        [self.btnsCellDelegate performSelector:@selector(clickBtnsWithBtnTag:) withObject:[NSNumber numberWithInteger:sender.tag]];
    }
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
